package com.aiyige.model.request;

import com.aiyige.base.api.ApiManager;
import com.aiyige.base.api.ApiUrls;
import com.aiyige.base.api.CrashReportManager;
import com.aiyige.base.api.service.ApiService;
import com.aiyige.model.AiyigeExceptionModel;
import com.aiyige.model.response.BaseResponse;
import com.aiyige.model.task.Task;
import com.aiyige.utils.crash.ExceptionLogModel;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by xiachao
 */

public class ExceptionSubmitRequest {

    AiyigeExceptionModel aiyigeExceptionModel;

    private ExceptionSubmitRequest(Builder builder) {
        aiyigeExceptionModel = builder.aiyigeExceptionModel;
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public static final class Builder {
        private AiyigeExceptionModel aiyigeExceptionModel;

        private Builder() {
        }

        public Builder aiyigeExceptionModel(AiyigeExceptionModel val) {
            aiyigeExceptionModel = val;
            return this;
        }


    public Call<ResponseBody> build() {
        return CrashReportManager.getService().submitException(ApiUrls.exceptionSubmit,aiyigeExceptionModel);
    }
    }


}
